export function getGridLevelByDeptCode(code) {
    var level = 0;
    switch (code.length) {
        case 4:
            level = "1";
            break;
        case 6:
            level = "2";
            break;
        case 9:
            level = "3";
            break;
        case 12:
            level = "4";
            break;
        default:
            level = "5";
            break;
    }
    return level;
}
export  function getGridServerNameByDeptCode(code) {
    var level = 0;
    switch (code.length) {
        case 4:
            level = "2";
            break;
        case 6:
            level = "2";
            break;
        case 9:
            level = "3";
            break;
        case 12:
            level = "4";
            break;
        default:
            level = "5";
            break;
    }
    return level;
}
export  function getNextLevelGridServerNameByDeptCode(code) {
    console.log("util。js"+code);
    var level = 0;
    switch (code.length) {
        case 4:
            level = "2";
            break;
        case 6:
            level = "3";
            break;
        case 9:
            level = "4";
            break;
        case 12:
            level = "5";
            break;
        default:
            level = "5";
            break;
    }
    return level;
}
export function getAppendParamByDeptCode(code) {
    var appendParam = "";
    switch (code.length) {
        case 4:
        case 6:
        case 9:
        case 12:
            appendParam = "xzqhdm+LIKE+%27" + code + "%25%27";
            break;
        // case 12:
        //     appendParam = "XZQHDM=" + code;
        //     break;
        default:
            appendParam = "xzqhdm=" + code;
            break;
    }
    return appendParam;
}
export function killNull(obj){
    return obj ? obj : "";
}
export function closeInfoWindow(map) {
    map.infoWindow.hide();
}